import React from 'react';

const MessageBox = ({ topLayout, mainLayout, children }) => {
  return (
    <div>
      {/* 把props.children属性得到的组件，命名为 默认插槽 */}
      {children}
      {/* 把props.mainLayout和props.topLayout ,设置为命名插槽 */}
      <div className='main'>
        {mainLayout}
      </div>
      <div className='top'>
        {topLayout}
      </div>
    </div>
  );
}

export default MessageBox;
